﻿using System;
using System.ComponentModel;
using System.Runtime.InteropServices;
using Teigha.Core;

namespace Teigha.TD
{
	public class OdDb3dPolyline : OdDbCurve
	{
		[EditorBrowsable(EditorBrowsableState.Never)]
		public OdDb3dPolyline(IntPtr cPtr, bool cMemoryOwn) : base(TD_DbPINVOKE.OdDb3dPolyline_SWIGUpcast(cPtr), cMemoryOwn)
		{
			this.swigCPtr = new HandleRef(this, cPtr);
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		public static HandleRef getCPtr(OdDb3dPolyline obj)
		{
			if (obj != null)
			{
				return obj.swigCPtr;
			}
			return new HandleRef(null, IntPtr.Zero);
		}

		~OdDb3dPolyline()
		{
			this.Dispose();
		}

		public override void Dispose()
		{
			if (this.swigCPtr.Handle != IntPtr.Zero)
			{
				if (this.swigCMemOwn)
				{
					lock (this.locker)
					{
						if (this.swigCPtr.Handle != IntPtr.Zero && this.swigCMemOwn)
						{
							this.swigCMemOwn = false;
							TD_DbPINVOKE.delete_OdDb3dPolyline(this.swigCPtr);
						}
					}
					this.swigCMemOwn = false;
				}
				this.swigCPtr = new HandleRef(null, IntPtr.Zero);
			}
			GC.SuppressFinalize(this);
			base.Dispose();
		}

		public new static OdDb3dPolyline cast(OdRxObject pObj)
		{
			MemoryManager memoryManager = MemoryManager.GetMemoryManager();
			MemoryTransaction currentTransaction = memoryManager.GetCurrentTransaction();
			IntPtr p = TD_DbPINVOKE.OdDb3dPolyline_cast(OdRxObject.getCPtr(pObj));
			OdDb3dPolyline result;
			if (currentTransaction != null)
			{
				currentTransaction.AddObject((OdDb3dPolyline)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true));
				result = (OdDb3dPolyline)Teigha.Core.Helpers.odrxCreateObjectInternal(p, false);
			}
			else
			{
				result = (OdDb3dPolyline)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true);
			}
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new static OdRxClass desc()
		{
			OdRxClass result = (OdRxClass)Teigha.Core.Helpers.odrxCreateObjectInternal(TD_DbPINVOKE.OdDb3dPolyline_desc(), false);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdRxClass isA()
		{
			OdRxClass result = (OdRxClass)Teigha.Core.Helpers.odrxCreateObjectInternal(TD_DbPINVOKE.OdDb3dPolyline_isA(this.swigCPtr), false);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdRxObject queryX(OdRxClass protocolClass)
		{
			OdRxObject result = Teigha.Core.Helpers.odrxCreateObjectInternal(TD_DbPINVOKE.OdDb3dPolyline_queryX(this.swigCPtr, OdRxClass.getCPtr(protocolClass)), false);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new static OdDb3dPolyline createObject()
		{
			MemoryManager memoryManager = MemoryManager.GetMemoryManager();
			MemoryTransaction currentTransaction = memoryManager.GetCurrentTransaction();
			IntPtr p = TD_DbPINVOKE.OdDb3dPolyline_createObject();
			OdDb3dPolyline result;
			if (currentTransaction != null)
			{
				currentTransaction.AddObject((OdDb3dPolyline)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true));
				result = (OdDb3dPolyline)Teigha.Core.Helpers.odrxCreateObjectInternal(p, false);
			}
			else
			{
				result = (OdDb3dPolyline)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true);
			}
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void makeClosed()
		{
			TD_DbPINVOKE.OdDb3dPolyline_makeClosed(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void makeOpen()
		{
			TD_DbPINVOKE.OdDb3dPolyline_makeOpen(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public Poly3dType polyType()
		{
			Poly3dType result = (Poly3dType)TD_DbPINVOKE.OdDb3dPolyline_polyType(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setPolyType(Poly3dType polyType)
		{
			TD_DbPINVOKE.OdDb3dPolyline_setPolyType(this.swigCPtr, (int)polyType);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void straighten()
		{
			TD_DbPINVOKE.OdDb3dPolyline_straighten(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdDbObjectId appendVertex(OdDb3dPolylineVertex pVertex)
		{
			MemoryManager memoryManager = MemoryManager.GetMemoryManager();
			MemoryTransaction currentTransaction = memoryManager.GetCurrentTransaction();
			IntPtr cPtr = TD_DbPINVOKE.OdDb3dPolyline_appendVertex(this.swigCPtr, OdDb3dPolylineVertex.getCPtr(pVertex));
			OdDbObjectId result;
			if (currentTransaction != null)
			{
				currentTransaction.AddObject(new OdDbObjectId(cPtr, true));
				result = new OdDbObjectId(cPtr, false);
			}
			else
			{
				result = new OdDbObjectId(cPtr, true);
			}
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdDbObjectId insertVertexAt(OdDbObjectId indexVertId, OdDb3dPolylineVertex pVertex)
		{
			MemoryManager memoryManager = MemoryManager.GetMemoryManager();
			MemoryTransaction currentTransaction = memoryManager.GetCurrentTransaction();
			IntPtr cPtr = TD_DbPINVOKE.OdDb3dPolyline_insertVertexAt__SWIG_0(this.swigCPtr, OdDbObjectId.getCPtr(indexVertId), OdDb3dPolylineVertex.getCPtr(pVertex));
			OdDbObjectId result;
			if (currentTransaction != null)
			{
				currentTransaction.AddObject(new OdDbObjectId(cPtr, true));
				result = new OdDbObjectId(cPtr, false);
			}
			else
			{
				result = new OdDbObjectId(cPtr, true);
			}
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdDbObjectId insertVertexAt(OdDb3dPolylineVertex pIndexVert, OdDb3dPolylineVertex pVertex)
		{
			MemoryManager memoryManager = MemoryManager.GetMemoryManager();
			MemoryTransaction currentTransaction = memoryManager.GetCurrentTransaction();
			IntPtr cPtr = TD_DbPINVOKE.OdDb3dPolyline_insertVertexAt__SWIG_1(this.swigCPtr, OdDb3dPolylineVertex.getCPtr(pIndexVert), OdDb3dPolylineVertex.getCPtr(pVertex));
			OdDbObjectId result;
			if (currentTransaction != null)
			{
				currentTransaction.AddObject(new OdDbObjectId(cPtr, true));
				result = new OdDbObjectId(cPtr, false);
			}
			else
			{
				result = new OdDbObjectId(cPtr, true);
			}
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdDb3dPolylineVertex openVertex(OdDbObjectId vertId, OpenMode mode, bool openErasedOne)
		{
			MemoryManager memoryManager = MemoryManager.GetMemoryManager();
			MemoryTransaction currentTransaction = memoryManager.GetCurrentTransaction();
			IntPtr p = TD_DbPINVOKE.OdDb3dPolyline_openVertex__SWIG_0(this.swigCPtr, OdDbObjectId.getCPtr(vertId), (int)mode, openErasedOne);
			OdDb3dPolylineVertex result;
			if (currentTransaction != null)
			{
				currentTransaction.AddObject((OdDb3dPolylineVertex)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true));
				result = (OdDb3dPolylineVertex)Teigha.Core.Helpers.odrxCreateObjectInternal(p, false);
			}
			else
			{
				result = (OdDb3dPolylineVertex)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true);
			}
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdDb3dPolylineVertex openVertex(OdDbObjectId vertId, OpenMode mode)
		{
			MemoryManager memoryManager = MemoryManager.GetMemoryManager();
			MemoryTransaction currentTransaction = memoryManager.GetCurrentTransaction();
			IntPtr p = TD_DbPINVOKE.OdDb3dPolyline_openVertex__SWIG_1(this.swigCPtr, OdDbObjectId.getCPtr(vertId), (int)mode);
			OdDb3dPolylineVertex result;
			if (currentTransaction != null)
			{
				currentTransaction.AddObject((OdDb3dPolylineVertex)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true));
				result = (OdDb3dPolylineVertex)Teigha.Core.Helpers.odrxCreateObjectInternal(p, false);
			}
			else
			{
				result = (OdDb3dPolylineVertex)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true);
			}
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdDbSequenceEnd openSequenceEnd(OpenMode mode)
		{
			MemoryManager memoryManager = MemoryManager.GetMemoryManager();
			MemoryTransaction currentTransaction = memoryManager.GetCurrentTransaction();
			IntPtr p = TD_DbPINVOKE.OdDb3dPolyline_openSequenceEnd(this.swigCPtr, (int)mode);
			OdDbSequenceEnd result;
			if (currentTransaction != null)
			{
				currentTransaction.AddObject((OdDbSequenceEnd)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true));
				result = (OdDbSequenceEnd)Teigha.Core.Helpers.odrxCreateObjectInternal(p, false);
			}
			else
			{
				result = (OdDbSequenceEnd)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true);
			}
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdDbObjectIterator vertexIterator()
		{
			MemoryManager memoryManager = MemoryManager.GetMemoryManager();
			MemoryTransaction currentTransaction = memoryManager.GetCurrentTransaction();
			IntPtr p = TD_DbPINVOKE.OdDb3dPolyline_vertexIterator(this.swigCPtr);
			OdDbObjectIterator result;
			if (currentTransaction != null)
			{
				currentTransaction.AddObject((OdDbObjectIterator)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true));
				result = (OdDbObjectIterator)Teigha.Core.Helpers.odrxCreateObjectInternal(p, false);
			}
			else
			{
				result = (OdDbObjectIterator)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true);
			}
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual void dxfOut(OdDbDxfFiler pFiler)
		{
			TD_DbPINVOKE.OdDb3dPolyline_dxfOut(this.swigCPtr, OdDbDxfFiler.getCPtr(pFiler));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public new virtual OdResult dxfIn(OdDbDxfFiler pFiler)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDb3dPolyline_dxfIn(this.swigCPtr, OdDbDxfFiler.getCPtr(pFiler));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdResult dwgInFields(OdDbDwgFiler pFiler)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDb3dPolyline_dwgInFields(this.swigCPtr, OdDbDwgFiler.getCPtr(pFiler));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual void dwgOutFields(OdDbDwgFiler pFiler)
		{
			TD_DbPINVOKE.OdDb3dPolyline_dwgOutFields(this.swigCPtr, OdDbDwgFiler.getCPtr(pFiler));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public new virtual OdResult dxfInFields(OdDbDxfFiler pFiler)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDb3dPolyline_dxfInFields(this.swigCPtr, OdDbDxfFiler.getCPtr(pFiler));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual void dxfOutFields(OdDbDxfFiler pFiler)
		{
			TD_DbPINVOKE.OdDb3dPolyline_dxfOutFields(this.swigCPtr, OdDbDxfFiler.getCPtr(pFiler));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public new virtual OdResult dxfInFields_R12(OdDbDxfFiler pFiler)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDb3dPolyline_dxfInFields_R12(this.swigCPtr, OdDbDxfFiler.getCPtr(pFiler));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual void dxfOutFields_R12(OdDbDxfFiler pFiler)
		{
			TD_DbPINVOKE.OdDb3dPolyline_dxfOutFields_R12(this.swigCPtr, OdDbDxfFiler.getCPtr(pFiler));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public new virtual OdResult subGetClassID(IntPtr pClsid)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDb3dPolyline_subGetClassID(this.swigCPtr, pClsid);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual void subClose()
		{
			TD_DbPINVOKE.OdDb3dPolyline_subClose(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public new virtual OdResult subExplode(OdRxObjectPtrArray entitySet)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDb3dPolyline_subExplode(this.swigCPtr, OdRxObjectPtrArray.getCPtr(entitySet));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdResult explodeGeometry(OdRxObjectPtrArray entitySet)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDb3dPolyline_explodeGeometry(this.swigCPtr, OdRxObjectPtrArray.getCPtr(entitySet));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdResult subTransformBy(OdGeMatrix3d xfm)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDb3dPolyline_subTransformBy(this.swigCPtr, OdGeMatrix3d.getCPtr(xfm));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual bool subWorldDraw(OdGiWorldDraw pWd)
		{
			bool result = TD_DbPINVOKE.OdDb3dPolyline_subWorldDraw(this.swigCPtr, OdGiWorldDraw.getCPtr(pWd));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual bool isPlanar()
		{
			bool result = TD_DbPINVOKE.OdDb3dPolyline_isPlanar(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdResult getPlane(OdGePlane plane, out Planarity planarity)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDb3dPolyline_getPlane(this.swigCPtr, OdGePlane.getCPtr(plane), out planarity);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual bool isClosed()
		{
			bool result = TD_DbPINVOKE.OdDb3dPolyline_isClosed(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual bool isPeriodic()
		{
			bool result = TD_DbPINVOKE.OdDb3dPolyline_isPeriodic(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdResult getStartParam(out double startParam)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDb3dPolyline_getStartParam(this.swigCPtr, out startParam);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdResult getEndParam(out double endParam)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDb3dPolyline_getEndParam(this.swigCPtr, out endParam);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdResult getStartPoint(OdGePoint3d startPoint)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDb3dPolyline_getStartPoint(this.swigCPtr, OdGePoint3d.getCPtr(startPoint));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdResult getEndPoint(OdGePoint3d endPoint)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDb3dPolyline_getEndPoint(this.swigCPtr, OdGePoint3d.getCPtr(endPoint));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdResult getPointAtParam(double param, OdGePoint3d pointOnCurve)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDb3dPolyline_getPointAtParam(this.swigCPtr, param, OdGePoint3d.getCPtr(pointOnCurve));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdResult getParamAtPoint(OdGePoint3d pointOnCurve, out double param)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDb3dPolyline_getParamAtPoint(this.swigCPtr, OdGePoint3d.getCPtr(pointOnCurve), out param);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdResult getDistAtParam(double param, out double dist)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDb3dPolyline_getDistAtParam(this.swigCPtr, param, out dist);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdResult getParamAtDist(double dist, out double param)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDb3dPolyline_getParamAtDist(this.swigCPtr, dist, out param);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdResult getFirstDeriv(double param, OdGeVector3d firstDeriv)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDb3dPolyline_getFirstDeriv(this.swigCPtr, param, OdGeVector3d.getCPtr(firstDeriv));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdResult getSecondDeriv(double param, OdGeVector3d secondDeriv)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDb3dPolyline_getSecondDeriv(this.swigCPtr, param, OdGeVector3d.getCPtr(secondDeriv));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdResult getArea(out double area)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDb3dPolyline_getArea(this.swigCPtr, out area);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdResult convertToPolyType(Poly3dType newVal)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDb3dPolyline_convertToPolyType(this.swigCPtr, (int)newVal);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdResult splineFit()
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDb3dPolyline_splineFit__SWIG_0(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdResult splineFit(Poly3dType splineType, short splineSegs)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDb3dPolyline_splineFit__SWIG_1(this.swigCPtr, (int)splineType, splineSegs);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdResult subGetSubentPathsAtGsMarker(SubentType type, IntPtr gsMark, OdGePoint3d arg2, OdGeMatrix3d arg3, OdDbFullSubentPathArray subentPaths, OdDbObjectIdArray pEntAndInsertStack)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDb3dPolyline_subGetSubentPathsAtGsMarker(this.swigCPtr, (int)type, gsMark, OdGePoint3d.getCPtr(arg2), OdGeMatrix3d.getCPtr(arg3), OdDbFullSubentPathArray.getCPtr(subentPaths), OdDbObjectIdArray.getCPtr(pEntAndInsertStack));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdResult subGetGsMarkersAtSubentPath(OdDbFullSubentPath subPath, SWIGTYPE_p_OdGsMarkerArray gsMarkers)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDb3dPolyline_subGetGsMarkersAtSubentPath(this.swigCPtr, OdDbFullSubentPath.getCPtr(subPath), SWIGTYPE_p_OdGsMarkerArray.getCPtr(gsMarkers));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdDbEntity subSubentPtr(OdDbFullSubentPath path)
		{
			MemoryManager memoryManager = MemoryManager.GetMemoryManager();
			MemoryTransaction currentTransaction = memoryManager.GetCurrentTransaction();
			IntPtr p = TD_DbPINVOKE.OdDb3dPolyline_subSubentPtr(this.swigCPtr, OdDbFullSubentPath.getCPtr(path));
			OdDbEntity result;
			if (currentTransaction != null)
			{
				currentTransaction.AddObject((OdDbEntity)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true));
				result = (OdDbEntity)Teigha.Core.Helpers.odrxCreateObjectInternal(p, false);
			}
			else
			{
				result = (OdDbEntity)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true);
			}
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdResult getOdGeCurve(OdGeCurve3d pGeCurve, OdGeTol tol)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDb3dPolyline_getOdGeCurve__SWIG_0(this.swigCPtr, pGeCurve, OdGeTol.getCPtr(tol));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdResult getOdGeCurve(OdGeCurve3d pGeCurve)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDb3dPolyline_getOdGeCurve__SWIG_1(this.swigCPtr, pGeCurve);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdResult setFromOdGeCurve(OdGeCurve3d geCurve, OdGeVector3d normal, OdGeTol tol)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDb3dPolyline_setFromOdGeCurve__SWIG_0(this.swigCPtr, OdGeCurve3d.getCPtr(geCurve), OdGeVector3d.getCPtr(normal), OdGeTol.getCPtr(tol));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdResult setFromOdGeCurve(OdGeCurve3d geCurve, OdGeVector3d normal)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDb3dPolyline_setFromOdGeCurve__SWIG_1(this.swigCPtr, OdGeCurve3d.getCPtr(geCurve), OdGeVector3d.getCPtr(normal));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdResult setFromOdGeCurve(OdGeCurve3d geCurve)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDb3dPolyline_setFromOdGeCurve__SWIG_2(this.swigCPtr, OdGeCurve3d.getCPtr(geCurve));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdResult reverseCurve()
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDb3dPolyline_reverseCurve(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		private object locker = new object();

		private HandleRef swigCPtr;
	}
}
